home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
EDITOR
/
AMAC44.ARJ
/
CENT11.QM
< prev
next >
Wrap
Text File
|
1991-10-21
|
9KB
|
207 lines
* CENT11.QM, v1.1b
* Macros to Center Lines, Paragraphs and Documents
* Written by Tom Hogshead
* With Macro Contributions by John Goodman and Kyle Watkins
* 10/20/91
*
* @(3) Position Cursor at Center of Line |new
*
* @(1) Centers Line, Moves To Next Line
* @(2) Centers Paragraph, Moves To Next Paragraph
* @(6) Centers Entire Document (Written by John Goodman)
*
* ┌ @(5) Center Current Line or Lines Delineated by Any Block
* │ (Written by John Goodman)
* └ @(8) Center Line(s) Delineated by Any Block (or Current Line
* if No Blocks Marked) within User-Prompted Right Margin
* (Does not Reset QEdit Right Margin Setting)
* (Written by John Goodman)
*
* ┌ @(4) Centers Line After Typing (Kyle Watkins, SemWare)
* │ (same as greyenter, for use with NON-enhanced keyboards)
* └ (greyenter)
* Centers Line After Typing (Kyle Watkins, SemWare)
* (for use with enhanced keyboards only)
*
*--eoi
* For other macros, see ALLMACRO.INF. For macros to remove centering
* by deleteing leading space in front of lines, blocks and paragraghs
* see DELSPxx.QM by John Goodman.
* These macros require "QEdit and QMAC v2.1, February, 1990" or later.
*
* To BEGIN, just type "START CENT" <Enter>. All pertinent files will be
* loaded in the "Ring" for viewing, and CENT11.MAC is read.
* Alternatively, type "START CENT 0" <Enter> and the disk copies of all
* files in the "Ring" will be loaded ready for editing, saving time.
*
* -------------------------
* @(1) Center Current Line
* -------------------------
* This macro centers the line in which the cursor is currently
* positioned and moves to the next line.
*
@1 MacroBegin UnmarkBlock CenterLine CursorDown
*
* 6 bytes Sat 08-25-1990 12:13:33
* 7 bytes Wed 05-15-1991 10:29:43 (JG/TH)
*
* ------------------------------
* @(2) Center Current Paragraph
* ------------------------------
* This macro centers the lines in the paragraph in which the
* cursor is currently positioned (or the previous paragraph
* if the cursor is on a blank line) and moves to the next
* paragraph.
@2 MacroBegin UnmarkBlock CursorDown PrevPara MarkLine NextPara
CursorUp CenterLine UnmarkBlock CursorDown MakeCtrofScreen
*
* 18 bytes Sat 08-25-1990 12:13:44
* 14 bytes Wed 05-15-1991 10:36:51 (JG/TH)
*
* ---------------------------------------
* @(3) Position Cursor at Center of Line
* ---------------------------------------
* This macro positions the cursor at center of right margin setting,
* e.g. if right margin is set to 80, cursor is positioned in col 41.
@3 MacroBegin UnmarkBlock InsertLine BegLine DropAnchor DropAnchor
CenterLine GotoBlockBeg DelLine
*
* 12 bytes Tue 10-08-1991 07:15:42 (TH @3)
*
* ----------------------------------------------------------------------
* @(4) Center Line After Typing, from Kyle Watkins, Semware
* ----------------------------------------------------------------------
* In case you do not have an enhanced keyboard, you may want to use
* the following macro instead of greyenter at the end:
@4 macrobegin centerline endline return
*
* 7 bytes Sun 08-26-1990 03:08:09
*
* -------------------------------------------------------------
* @(5) Center Line(s) Delineated by Any Block (or Current Line
* if No Blocks Marked), John Goodman, author
* -------------------------------------------------------------
* This macro centers all lines bound by block begin and end
* positions. Any type of block (character, line, or column) may
* be used to delineate the line(s) and only one block marker need
* be set. If no block markers are set, the current line is
* centered. The cursor will be placed on the line following the
* last one centered so that the macro can be invoked repeatedly
* to center a series of lines.
@5 MacroBegin
CursorRight * Needed for single-line blocks
GotoBlockEnd * Try going to block end, retain pos.
JTrue BLK: * Determine if a completed block
DropAnchor * If not, DropAnchor will finish it
* or mark current line if none started
GotoBlockEnd * Go to block end to retain position
BLK:
GotoBlockBeg * Start at the 1st line
MarkLine * Mark first line
PrevPosition * Return to where block ended
CenterLine * Center the Blocked Lines
UnmarkBlock * Unmark the block
CursorDown * Goto Next Line to Do Again
BegLine
*
* 17 bytes Fri 04-19-1991 17:23:18
* 18 bytes Wed 05-15-1991 11:03:25 (JG)
*
*-------------------------------------------------
* @(6) Center Entire Document
* (Written by Tom Hogshead and John Goodman
*-------------------------------------------------
* This macro centers every line in the file currently being edited.
*
@6 MacroBegin UnmarkBlock EndFile MarkLine BegFile CenterLine UnmarkBlock
*
* 11 bytes Fri 04-19-1991 17:34:59
* 10 bytes Wed 05-15-1991 11:30:04 (JG/TH)
*
* -------------------------------------------------------------
* @(8) Center Line(s) Delineated by Any Block (or Current Line
* if No Blocks Marked) within User-Prompted Right Margin
* (Does not Reset QEdit Right Margin Setting)
* (Written by John Goodman)
* -------------------------------------------------------------
* This macro centers lines between column 1 and a right margin
* entered by the user at the "Goto column" prompt. Lines that are
* longer than the column number entered by the user will be shifted
* all the way to the left. Any type of block (character, line, or
* column) may be used to delineate the line(s) and only one block
* marker need be set. If no block markers are set, the current line
* is centered. The cursor will be placed on the line following the
* last one centered so that the macro can be invoked repeatedly to
* center a series of lines. This macro does not reset the QEdit
* right margin setting normally used to center or wordwrap lines.
*
@8 MacroBegin
CursorRight * Needed for single line block
GotoBlockEnd * Try going to block end, retain pos.
JTrue BLK: * Determine if a completed block
DropAnchor * If not, DropAnchor will finish it
* or mark current line if none started
GotoBlockEnd * Go to block end to retain position
MarkLine * Mark first line
BLK: * Line block now set
BegLine * Go to begin of last line
GotoBlockBeg * Go straight up to 1st line of block
MarkColumn * Start column block
PrevPosition * Return to last line of block
BegLine * Make sure we're in col 1
GotoColumn * Prompt user for right margin
Pause Return
CenterLine * Centerline will now del leading spaces
UnmarkBlock * Unmark the block
BegLine * Go to begin of last line
CursorDown * Move to next line to do again!
*
* 24 bytes Tue 06-25-1991 18:55:41 (JG)
*
* ----------------------------------------------------------------------
* (GreyEnter) Center Line After Typing, from Kyle Watkins, Semware
* ----------------------------------------------------------------------
* This macro, written by Kyle Watkins of SemWare, requires an enhanced
* keyboard
greyenter macrobegin centerline endline return
*
* 7 bytes Sat 08-25-1990 17:32:31 (size added by TH)
* Now when you type your text, then press the Grey Enter Key (Far right
* hand side of your keyboard), your text will be centered as the cursor
* moves to the next line.
* This will keep your regular Enter key, to be used as normal --
* Please note that if you DO NOT have an enhanced (101 key) keyboard, with
* QEdit recognizing it as such -- then the Grey Enter and regular Enter,
* are treated as the same key.
* Version History:
*
* 1.1 -Removed @3, replaced with @6 (J Goodman) which does the same
* thing but much faster and smoother.
* -Added @5 to Center Current Line or Lines Delineated by Any
* Block (J Goodman)
* -Modified @1/2/6 per John Goodman
* -Added @8 to center lines with user prompted right margin,
* Written by John Goodman.
* 1.1a -Minor documentation changes
* 1.1b -Added @3 to position cursor at center of line. 10/8/91